<?php
class loginGuild extends ActionHandler
{
	function handleRequest($jsonData)
	{
		$data = $jsonData['params'];
		$userId = $jsonData['userId'];
		$sql = "select distinct guildId from ".$this->tables['guild_user_profile']." where userId = ".$userId;
		$result = $this->db->query($sql);
		$this->debug .= "\n".$sql."\n";
		$guildId = -1;
		if( $arr = $this->db->fetchArray($result))
		{
			$guildId = $arr['guildId'];
		}
		$return = array();
		$return['guildId'] = $guildId;
		$this->debug .= " ".$return['guildId']." ";
		return $return;
		
	}
}

?>